<?php

require_once (ROOT . DS . 'library' . DS . 'phptal' . DS . 'PHPTAL.php');

// create a new template object
$template = new PHPTAL(VIEW_TEMPLATE_FOLDER . DS . 'package' . DS . 'crud.html');

$template->packages = $package->viewAll();
$template->pageUrl = curPageURL();

// execute the template
try {
    echo $template->execute();
}
catch (Exception $e){
    echo $e;
}